package com.catsic.zcjc.dao;

import java.util.List;

import javax.persistence.QueryHint;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.QueryHints;

import com.catsic.base.BaseDao;
import com.catsic.zcjc.entity.Station;


public interface StationDao extends BaseDao<Station, String>{
	
	public Station findByName(String name);
	
	public Station findByCode(String code);

	@Query("select s from Station s where s.organ.id = ?1 order by s.code asc")
	@QueryHints({ @QueryHint(name = "org.hibernate.cacheable", value ="true") })
	public List<Station> findByOid(String oid);
	

}
